var CustomConnect = function() {
    this.GET_PUSH_TOKEN = "get_push_token";
    this.IMG_FILE_NAME_ENCODE = "get_endcode_base64";
    this.CordovaPlugin = cordova.exec;
};

CustomConnect.prototype = {
	constructor : CustomConnect,
	test:function($msg) {
	    if(cordova == undefined || cordova.exec == undefined) {
	        return;
	    }
	    this.CordovaPlugin(function($success) {
	        alert("success :: " + $success);
	    }, function($fail) {
	        
	    }, "CustomConnect", this.GET_PUSH_TOKEN, [null]);
	},
	
	getPushToken : function($callback) {
	     if(cordova == undefined || cordova.exec == undefined) {
            return;
        }
        this.CordovaPlugin(function($success) {
            $callback($success);
        }, function($fail) {
            $callback(null);
        }, "CustomConnect", this.GET_PUSH_TOKEN, [null]);
	},
	getImgFileNameEncode : function($filename, $callback) {
         if(cordova == undefined || cordova.exec == undefined) {
            return;
        }
        this.CordovaPlugin(function($success) {
            $callback($success);
        }, function($fail) {
            $callback(null);
        }, "CustomConnect", this.IMG_FILE_NAME_ENCODE, [$filename]);
    }
};
